////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2011-2012 www.iflytek.com. All Rights Reserved.
//  This software for customer relationship management system, developed by Noo team.
//  Software code and design for the team, copy rights reserved.
////////////////////////////////////////////////////////////////////////////////

package com.iflytek.ci.cums.service.impl;

import java.util.List;

import com.iflytek.ci.cums.dao.RoleDao;
import com.iflytek.ci.cums.domain.Role;
import com.iflytek.ci.cums.service.RoleService;
import com.iflytek.framework.pagination.PaginationCriteria;
import com.iflytek.framework.pagination.PaginationResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Transactional;

/**
 * <p>
 * .
 * </p>
 *
 * @author poplar.yfyang
 * @version 1.0 2012-11-17 9:42 PM
 * @since JDK 1.5
 */
@Service("roleService")
@Transactional(readOnly = true, isolation = Isolation.READ_UNCOMMITTED)
public class RoleServiceImpl implements RoleService {

	/** role dao */
	@Autowired
	private RoleDao roleDao;

	@Override
	public List<Role> user_role(long user) {
		return roleDao.user_role(user);
	}

	@Override
	public PaginationResult<Role> find_role_list(PaginationCriteria criteria) {
		return roleDao.find_page_roles(criteria);
	}
}
